package com.isunland.managesystem.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BasePagerActivity;
import com.isunland.managesystem.entity.CompanyForumType;
import com.isunland.managesystem.entity.MyCircle;

/**
 * 对象功能:  圈子帖子和成员列表
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: HuXiaoDan
 * 创建时间: 2017/3/16 19:23
 */
public class MyCircleMembersPagerActivity extends BasePagerActivity {

  private MyCircle content;

  @Override protected void onCreate(Bundle arg0) {
    content = (MyCircle) getIntent().getSerializableExtra(MyCircleMembersListFragment.EXTRA_VALUE);
    super.onCreate(arg0);
  }

  @Override protected Fragment createFragmentOne() {
    CompanyForumType type = new CompanyForumType();
    type.setName(content.getCirclename());
    String from = AgriculturalForumListFragment.CIRCLE;
    String jobno = content.getId();
    return AgriculturalForumListFragment.newInstance(type, from, jobno);
  }

  @Override protected Fragment createFragmentTwo() {
    return MyCircleMembersListFragment.newInstance(content);
  }

  @Override protected int[] createTitle() {
    return new int[] { R.string.circleTopic, R.string.circleMember };
  }

  @Override protected void setFixedTitle(boolean isFixedTitle, String fixedTitle) {
    super.setFixedTitle(true, content.getCirclename());
  }
}
